package application.util 
{
	import flash.display.DisplayObject;
	import flash.display.LoaderInfo;
	import flash.display.Stage;
	import flash.media.Sound;
	/**
	 * ...
	 * @author dragonWorrior
	 */
	public class ResourceUtil 
	{
		public static var appStage:Stage;
		public static var uiResource:LoaderInfo;
		
		public function ResourceUtil() 
		{
			
		}
		
		public static function getDisplayObject(name:String):DisplayObject
		{
			var cls:Class = uiResource.applicationDomain.getDefinition(name) as Class;
			var displayObj:DisplayObject = new cls() as DisplayObject;
			
			return displayObj;
		}
		
		public static function getSoundObject(name:String):Sound
		{
			var cls:Class = uiResource.applicationDomain.getDefinition(name) as Class;
			var soundObj:Sound = new cls() as Sound;
			
			return soundObj;
		}
	}

}